package indi.kane.demandlist.controller;

import indi.kane.demandlist.entity.Member;
import indi.kane.demandlist.service.impl.MemberService;
import indi.kane.demandlist.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.lang.reflect.Method;
import java.util.List;

/**
 * @ClassName: MemberController
 * @Author: kane
 * @Date: 2020-05-28 2:51 下午
 * @Description:
 */
@RestController
@RequestMapping("member")
public class MemberController {
    @Autowired
    MemberService memberService;

    @PostMapping("query")
    public ResultVo query(@RequestBody Member member){
        return memberService.query(member.getName());
    }

    @PostMapping("insert")
    public ResultVo insert(@RequestBody Member member){
        return memberService.insertSelective(member);
    }
}